package com.laf.service.impl;

import com.laf.mapper.NoticeMapper;
import com.laf.model.Notice;
import com.laf.service.NoticeService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @author: He Changjie  on  2018-09-28
 * @description:
 */
@Service("noticeService")
public class NoticeServiceImpl implements NoticeService {

    @Resource
    NoticeMapper mapper;

    @Override
    public int update(Notice notice) {
        return mapper.update(notice);
    }

    @Override
    public int delete(Integer id) {
        return mapper.delete(id);
    }

    @Override
    public int foundTotal() {
        return mapper.foundTotal();
    }

    @Override
    public int lostTotal() {
        return mapper.lostTotal();
    }

    @Override
    public int foundThreeDay() {
        return mapper.foundThreeDay();
    }

    @Override
    public int lostThreeDay() {
        return mapper.lostThreeDay();
    }

    @Override
    public int getBack() {
        return mapper.getBack();
    }

    @Override
    public Notice findById(String noticeId) {
        return mapper.findById(noticeId);
    }

    @Override
    public int save(Notice notice) {
        return mapper.save(notice);
    }

    @Override
    public List<Notice> findAllLost() {
        List<Notice> all = mapper.findAllLost();
        return  all;
    }

    @Override
    public List<Notice> findAllFound() {
        List<Notice> all = mapper.findAllFound();
        return  all;
    }

    @Override
    public List<Notice> selectByPage(Notice notice, int pageNum, int pageSize,int type) {
        List<Notice> list = mapper.selectByPage(notice, pageNum, pageSize,type);
        return list;
    }

    @Override
    public List<Notice> queryAll(String cateId, String title, String lowTime, String hiTime, int type) {
        return mapper.queryAll(cateId, title, lowTime, hiTime, type);
    }
}
